.class public Lcom/inmobi/re/configs/ConfigParams;
.super Ljava/lang/Object;
.source "ConfigParams.java"


# instance fields
.field a:Lcom/inmobi/commons/uid/UID;

.field b:Ljava/lang/String;

.field c:I

.field d:I

.field e:I


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 62
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 27
    new-instance v0, Lcom/inmobi/commons/uid/UID;

    invoke-direct {v0}, Lcom/inmobi/commons/uid/UID;-><init>()V

    iput-object v0, p0, Lcom/inmobi/re/configs/ConfigParams;->a:Lcom/inmobi/commons/uid/UID;

    .line 29
    const-string v0, "#00000000"

    iput-object v0, p0, Lcom/inmobi/re/configs/ConfigParams;->b:Ljava/lang/String;

    .line 30
    const/16 v0, 0x140

    iput v0, p0, Lcom/inmobi/re/configs/ConfigParams;->c:I

    .line 31
    const/16 v0, 0x1e0

    iput v0, p0, Lcom/inmobi/re/configs/ConfigParams;->d:I

    .line 32
    const/16 v0, 0x64

    iput v0, p0, Lcom/inmobi/re/configs/ConfigParams;->e:I

    .line 63
    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    invoke-virtual {p0, v0}, Lcom/inmobi/re/configs/ConfigParams;->setFromJSON(Lorg/json/JSONObject;)V

    .line 64
    return-void
.end method


# virtual methods
.method public getPicHeight()I
    .locals 1

    .prologue
    .line 39
    iget v0, p0, Lcom/inmobi/re/configs/ConfigParams;->d:I

    return v0
.end method

.method public getPicQuality()I
    .locals 1

    .prologue
    .line 43
    iget v0, p0, Lcom/inmobi/re/configs/ConfigParams;->e:I

    return v0
.end method

.method public getPicWidth()I
    .locals 1

    .prologue
    .line 35
    iget v0, p0, Lcom/inmobi/re/configs/ConfigParams;->c:I

    return v0
.end method

.method public getUID()Lcom/inmobi/commons/uid/UID;
    .locals 1

    .prologue
    .line 59
    iget-object v0, p0, Lcom/inmobi/re/configs/ConfigParams;->a:Lcom/inmobi/commons/uid/UID;

    return-object v0
.end method

.method public getWebviewBgColor()I
    .locals 3

    .prologue
    .line 49
    :try_start_0
    iget-object v0, p0, Lcom/inmobi/re/configs/ConfigParams;->b:Ljava/lang/String;

    invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v0

    .line 55
    :goto_0
    return v0

    .line 50
    :catch_0
    move-exception v0

    .line 52
    const-string v1, "IMRE_3.7.0"

    const-string v2, "Invalid bg color. Reverting to default"

    invoke-static {v1, v2, v0}, Lcom/inmobi/commons/internal/Log;->internal(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 53
    const-string v0, "#00000000"

    invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v0

    goto :goto_0
.end method

.method public setFromJSON(Lorg/json/JSONObject;)V
    .locals 4
    .parameter

    .prologue
    .line 67
    if-nez p1, :cond_0

    .line 85
    :goto_0
    return-void

    .line 70
    :cond_0
    :try_start_0
    const-string v0, "wthc"

    const-string v1, "#00000000"

    invoke-static {p1, v0, v1}, Lcom/inmobi/commons/internal/InternalSDKUtil;->getStringFromJSON(Lorg/json/JSONObject;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/inmobi/re/configs/ConfigParams;->b:Ljava/lang/String;

    .line 72
    const-string v0, "picH"

    const/16 v1, 0x1e0

    const/4 v2, 0x1

    const v3, 0x7fffffff

    invoke-static {p1, v0, v1, v2, v3}, Lcom/inmobi/commons/internal/InternalSDKUtil;->getIntFromJSON(Lorg/json/JSONObject;Ljava/lang/String;III)I

    move-result v0

    iput v0, p0, Lcom/inmobi/re/configs/ConfigParams;->d:I

    .line 75
    const-string v0, "picW"

    const/16 v1, 0x140

    const/4 v2, 0x1

    const v3, 0x7fffffff

    invoke-static {p1, v0, v1, v2, v3}, Lcom/inmobi/commons/internal/InternalSDKUtil;->getIntFromJSON(Lorg/json/JSONObject;Ljava/lang/String;III)I

    move-result v0

    iput v0, p0, Lcom/inmobi/re/configs/ConfigParams;->c:I

    .line 77
    const-string v0, "picA"

    const/16 v1, 0x64

    const/4 v2, 0x1

    const/16 v3, 0x64

    invoke-static {p1, v0, v1, v2, v3}, Lcom/inmobi/commons/internal/InternalSDKUtil;->getIntFromJSON(Lorg/json/JSONObject;Ljava/lang/String;III)I

    move-result v0

    iput v0, p0, Lcom/inmobi/re/configs/ConfigParams;->e:I

    .line 80
    const-string v0, "ids"

    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v0

    .line 81
    iget-object v1, p0, Lcom/inmobi/re/configs/ConfigParams;->a:Lcom/inmobi/commons/uid/UID;

    invoke-virtual {v1, v0}, Lcom/inmobi/commons/uid/UID;->setFromJSON(Lorg/json/JSONObject;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 82
    :catch_0
    move-exception v0

    .line 83
    const-string v0, "IMRE_3.7.0"

    const-string v1, "Unable to read UID configs"

    invoke-static {v0, v1}, Lcom/inmobi/commons/internal/Log;->debug(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0
.end method

.method public toJSON()Lorg/json/JSONObject;
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lorg/json/JSONException;
        }
    .end annotation

    .prologue
    .line 88
    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    .line 89
    iget-object v1, p0, Lcom/inmobi/re/configs/ConfigParams;->a:Lcom/inmobi/commons/uid/UID;

    invoke-virtual {v1}, Lcom/inmobi/commons/uid/UID;->toJSON()Lorg/json/JSONObject;

    move-result-object v1

    .line 90
    const-string v2, "wthc"

    iget-object v3, p0, Lcom/inmobi/re/configs/ConfigParams;->b:Ljava/lang/String;

    invoke-virtual {v0, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 91
    const-string v2, "ids"

    invoke-virtual {v0, v2, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 92
    return-object v0
.end method
